Does object pass filter

Let's say I have an object o, in module m, and a filter f. What is the easiest way of finding out whether o would be accepted by f?

Here is some context:

Let's say I have a module m as well as two filters, f1 and f2.

f1 is intended for baseline b1f2 is intended for b2.

I want to know which objects pass filter f1 in b1 and filter f2 in b2.

 

Thanks,

Grasswistle


grasswistle - Tue Jan 07 12:35:06 EST 2014

Re: Does object pass filter
llandale - Wed Jan 08 12:07:27 EST 2014

I think you just need to apply the Filter and see if the object is seen.

My DXL doesn't use any "Filters"; I just decide the criteria and query each object directly.  So if your "Filter" is something like "Attr XYZ contains ABC" then I would query that object to see if the obj-attr-value contains ABC.

I have had no luck at all trying to turn a "Filter" into queriable code; other than eye-balling it and coding the equivalent.

-Louie

Re: Does object pass filter
sekrbo - Thu Jan 09 03:45:37 EST 2014

I guess the easiest way would be to

  1. open the module,
  2. set f1,
  3. loop through the filtered module with for obj in module, add each object's abs no to skip list 1,
  4. set f2,
  5. loop again adding the abs no to skip list 2,
  6. loop through skip 1 => b1
  7. loop through skip 2 => b2

???

/sekrbo